package ym.controller.front.website;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import ym.pojo.Feedback;
import ym.service.FeedbackService;
import ym.vo.BaseResult;

/**
 * 反馈
 */
@RestController
@CrossOrigin
@RequestMapping("/front/feedback")
public class FrontFeedbackController {

    @Autowired
    private FeedbackService feedbackService;

    /**
     * 新增
     *
     * @param feedback
     * @return
     */
    @PostMapping("/add")
    public BaseResult add(Feedback feedback) {
        feedbackService.add(feedback);
        return BaseResult.ok();
    }
}
